import torch;
import numpy as np;
#x = torch.rand(3,4)
#print(x)
#y = torch.zeros(3,4)
#print(y)
#y.add_(x)

#print(y)

#x=torch.randn(4,4)
#print(x)
#y=x.view(16)
#print(y)

# GPU是否可用
#c = torch.cuda.is_available();
#print(c)

#ReLU 神经网络
N, D_in, H, D_out = 64,1000,100,10


x = np.random.randn(N,D_in); # 64*1000
Y = np.random.randn(N,D_out); # 64*10

W1 = np.random.randn(D_in,H); #1000*100
W2 = np.random.randn(H,D_out); #100*10

learning_rate = 1e-6;

for t in range(500):
    h = x.dot(W1)  # N*H   64*100
    h_relu = np.maximum(h,0)
    y_pred = h_relu.dot(W2);  #64*10;












print(x)